<%@ page import="com.informet.ipd.modelo.dao.TalentoAlumnoMonitoreoDao" %>
<%@ page import="com.informet.ipd.modelo.vo.TalentoVO" %>
<%@ page import="com.informet.ipd.struts.form.AvancePorActividadForm" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.swing.JOptionPane"%>
<%@ page import="constantes.Constantes" %>

<%@ taglib uri="/tags/c" prefix="c"%>



<%
            //JOptionPane.showMessageDialog(null, request.getParameter("codProgrma"));

            StringBuffer cadenaSalida = new StringBuffer();

            TalentoAlumnoMonitoreoDao supportFacade = new TalentoAlumnoMonitoreoDao();
            AvancePorActividadForm form1 = new AvancePorActividadForm();
            TalentoVO  talentoVO  = null;

         try{
                    List listEtiquetas = null;
                    String tipoOper=request.getParameter("tipoOper");
                    String tipoAspecto="llenarCombo";
                    String descCausaRetiro=request.getParameter("nombEtiqueta");                    
                    String codCausaRet=request.getParameter("codCausaRet");

                    talentoVO=new TalentoVO
                                                    ("",Integer.parseInt("0"),
                                                          "0","0",
                                                          "0","0",
                                                          tipoOper,descCausaRetiro,
                                                          codCausaRet,tipoAspecto
                                                     );

                    supportFacade.spMan(talentoVO);

                    listEtiquetas=supportFacade.getListCausaRetiro(null, null);

                     cadenaSalida.append("           <select  id='codCausaRet'  >");
                     cadenaSalida.append("               <option value='0'>Seleccionar Causa</option>");
                                                                Iterator it = listEtiquetas.iterator();
                                                                while (it.hasNext()) {
                                                                        talentoVO = (TalentoVO) it.next();
                                                                        if(!talentoVO.getCodcausaRet().equals(codCausaRet))
                                                                            cadenaSalida.append("<option value='"+talentoVO.getCodcausaRet()+"'>"+talentoVO.getDescCausaRet()+"</option>");
                                                                        else
                                                                            cadenaSalida.append("<option selected value='"+talentoVO.getCodcausaRet()+"'>"+talentoVO.getDescCausaRet()+"</option>");
                                                                }
                     cadenaSalida.append("           </select>");

                

                
            } catch (Exception e) {
                   cadenaSalida.append("error : "+e.toString());
            }
            out.print(cadenaSalida);
%>